#include <stdio.h>
#include "queue.h"

uint8_t queue_shortdata[3]; //测试队列
uint8_t queue_data[130];	//测试队列

int main(void) 
{
	short x, d;
	
	//大数组初始化测试
	if(queueInit(queue_data, sizeof(queue_data), sizeof(short)) == Q_OK){
		printf("queue_data数组初始化成功\r\n");
	}
	
	
	//写入测试
	d = -3;
	queuePush(queue_data, &d, sizeof(short));
	d = 2;
	queuePush(queue_data, &d, sizeof(short));
	d = -1;
	queuePush(queue_data, &d, sizeof(short));
	
	//读取测试
	queuePull(queue_data, &x, sizeof(short));
	printf("第一个数据：%d\r\n", x);
	queuePull(queue_data, &x, sizeof(short));
	printf("第二个数据：%d\r\n", x);
	queuePull(queue_data, &x, sizeof(short));
	printf("第三个数据：%d\r\n", x);
}

